home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / A86V402.ZIP / PAGE.BL < prev    next >
Text File  |  1987-04-08  |  901b  |  23 lines

  1. ; Following is a minimal program for sending a sequence of bytes to the
  2. ;   PRN printer-device.  The codes that are sent appear in the DB statement
  3. ;   following the label CODES.
  4.  
  5. PRINT_CODES:
  6.   MOV DX,PRN_NAME   ; point to the printer's device name
  7.   MOV AX,03D01      ; MSDOS codes for "open for writing"
  8.   INT 33            ; call MSDOS to open the printer device
  9.   XCHG BL,AX        ; swap the printer's open-file handle into BX
  10.   MOV DX,CODES      ; point to the codes we are outputting
  11.   MOV CX,LENGTH     ; load the number of code bytes
  12.   MOV AH,040        ; MSDOS code for "write"
  13.   INT 33            ; write the codes to the printer
  14.   MOV AX,04C00      ; MSDOS codes for "successful process termination"
  15.   INT 33            ; go back to the operating system
  16.  
  17. PRN_NAME:
  18.   DB 'PRN',0
  19.  
  20. CODES:
  21.   DB 0C             ; single form-feed for the PAGE program
  22. LENGTH EQU $-CODES
  23.